import { reactive } from 'vue'
import {
  ProductType,
  BubbleItemType,
  TaskItemType,
} from './init-data-types'

// const fontSize = reactive(window.document.documentElement.style)
// const fontSizeNum = Number(fontSize.fontSize.slice(0, fontSize.length - 3))
const fontSizeNum = 37.5

export const productList = reactive<ProductType[]>([
  {
    name: '顶配iphone Xs 256G 123123',
    price: '6.88',
  },
  {
    name: '顶配iphone Xs 256G 123123',
    price: '6.88',
  },
  {
    name: '顶配iphone Xs 256G 123123',
    price: '6.88',
  },
  {
    name: '顶配iphone Xs 256G 123123',
    price: '6.88',
  },
])

export const bubbleArr = reactive<BubbleItemType[]>([
  {
    type: false,
    top: 144.5 / fontSizeNum + 'rem',
    left: 35 / fontSizeNum + 'rem',
    value: '支付成功',
  },
  {
    type: false,
    top: 110 / fontSizeNum + 'rem',
    left: 101 / fontSizeNum + 'rem',
    value: '支付成功',
  },
  {
    type: false,
    top: 117 / fontSizeNum + 'rem',
    left: 165 / fontSizeNum + 'rem',
    value: '支付成功',
  },
  {
    type: true,
    top: 110 / fontSizeNum + 'rem',
    left: 229.5 / fontSizeNum + 'rem',
    value: '新人专享',
  },
  {
    type: false,
    top: 144.5 / fontSizeNum + 'rem',
    left: 292 / fontSizeNum + 'rem',
    value: '运动步数',
  },
])

export const taskList1 = reactive<TaskItemType[]>([
  {
    text: '逛一逛活动页',
    goldNum: 10,
    status: 1,
  },
  {
    text: '逛一逛首页',
    status: 1,
    goldNum: 20,
  },
  {
    text: '逛一逛生活号首页',
    status: 1,
    goldNum: 30,
  },
  {
    text: '去分享',
    status: 1,
    goldNum: 20,
  },
])

export const taskList2 = reactive<TaskItemType[]>([
  {
    text: '收藏人人租机小程序',
    status: 1,
    goldNum: 10,
  },
  {
    text: '进行实名认证',
    status: 1,
    goldNum: 10,
  },
])
